/**
 * @file   main.cpp
 * @author Shao <student@student>
 * @date   Tue Nov  2 22:38:46 2021
 * 
 * @brief  
 * 
 * 
 */

#include<iostream>
#include<random>
#include<ctime>
using namespace std;
 
#include"BinarySearchTree.h"

void BST_sort();
void Randomized_BST_sort();

int main()
{
	BST_sort();
    cout << '\n';
    Randomized_BST_sort();

	return 0;
}

void BST_sort()
{
    BinarySearchTree<int> t;
	for (size_t i = 0; i < 10; ++i)
	{
		t.insert(10-i);
	}
    t.printTree();
}

void Randomized_BST_sort()
{
    BinarySearchTree<int> t;
    uniform_int_distribution<unsigned int> u(0,100);
	default_random_engine e(time(0)); 
    for (size_t i = 0; i < 10; ++i)
	    {
		    t.insert(u(e));
	    }
    t.printTree();
}
